
// #ifndef VUE3
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

Vue.prototype.$baseUrl = 'http://localhost:8080'

App.mpType = 'app'

Vue.prototype.$fileBaseUrl = 'http://localhost:8080/file'
Vue.prototype.$cfuserBaseUrl = 'http://localhost:8080/cfuser'

Vue.prototype.$request = function (options = {}) {
	let token = wx.getStorageSync('token');
	options.url = 'http://localhost:8080/' + options.url
	return new Promise(() => {
		uni.request({
			...options,
			header: { "authorization": "Bearer " + token},
		})
	})
}

const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif

